'use strict'

let { Sequelize, DataTypes } = require("sequelize");

// 数据库配置                   库名    数据库类型   密码
let sequelize = new Sequelize("hyh", "postgres", "521300", {
    // 服务器
    host: "8.129.0.19",
    dialect: "postgres"
});

// 建表
let defineModel = function(name,edit){
    let User = sequelize.define(name,edit);
    return User;
}


let obj = {
    sequelize,
    defineModel,
    DataTypes
};

module.exports = obj;